package com.qijian.maindata.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.qijian.common.annotation.Excel;
import com.qijian.common.core.domain.BaseEntity;
import com.qijian.maindata.domain.vo.InspectionItemVo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;

import java.math.BigDecimal;
import java.util.List;

/**
 * 检验方案-新对象 main_inspection_scheme
 *
 * @author qijian
 * @date 2024-02-02
 */
@EqualsAndHashCode(callSuper = true)
@Data
@ToString
@TableName("main_inspection_scheme")
public class InspectionScheme extends BaseEntity{
    private static final long serialVersionUID = 1L;

    @JsonSerialize(using= ToStringSerializer.class)
    @ApiModelProperty(value = "ID")
    private Long id;

    @Excel(name = "编号")
    @ApiModelProperty(value = "编号")
    private String schemeCode;

    @Excel(name = "名称")
    @ApiModelProperty(value = "名称")
    private String schemeName;

    @Excel(name = "描述")
    @ApiModelProperty(value = "描述")
    private String remark;

    @Excel(name = "参数列")
    @ApiModelProperty(value = "参数列")
    private Long paramQty;

    @Excel(name = "产品名称")
    @ApiModelProperty(value = "产品名称")
    private String itemName;

    @Excel(name = "产品编码")
    @ApiModelProperty(value = "产品编码")
    private String itemCode;

    @Excel(name = "产品名称id")
    @JsonSerialize(using= ToStringSerializer.class)
    @ApiModelProperty(value = "产品名称id")
    private Long itemId;

    @Excel(name = "报检类型")
    @ApiModelProperty(value = "报检类型")
    private String inspectionType;

    @Excel(name = "BOMID")
    @JsonSerialize(using= ToStringSerializer.class)
    @ApiModelProperty(value = "BOMID")
    private Long bomId;

    @Excel(name = "检验班组id")
    @ApiModelProperty(value = "检验班组id")
    @JsonSerialize(using= ToStringSerializer.class)
    private Long checkType;

    @Excel(name = "检验要求")
    @ApiModelProperty(value = "检验要求")
    private String requirements;

    @ApiModelProperty("是否默认方案")
    private Boolean isDefault;

    @ApiModelProperty("检验方案频次")
    private Long schemeFrequency;

    @ApiModelProperty("抽检比例")
    private BigDecimal samplingRatio;

    //检验项明细
    @TableField(exist = false)
    private Object items;
}
